FROM openjdk:8u171-alpine3.8

LABEL maintainer="Jack Peng <cnjack.peng@foxmail.com>"

COPY target/ibp-edge.jar /usr/local

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main/" > /etc/apk/repositories \
    && echo "https://mirrors.aliyun.com/alpine/v3.8/community/" >> /etc/apk/repositories \
    && apk update \
    && apk add --no-cache \
    && apk add tzdata curl bash ttf-dejavu  \
    && rm -rf /var/cache/apk/* \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

EXPOSE 9000
ENTRYPOINT java $JAVA_OPTS -Dconfig_url=$config_url -Dconfig_active=$config_active -jar "/usr/local/ibp-edge.jar"
